//
//  YJSCustomCell.m
//  11111
//
//  Created by ma c on 16/4/24.
//  Copyright © 2016年 ma c. All rights reserved.
//

#import "YJSCustomCell.h"
#import "YJSUIColor+Extension.h"
@implementation YJSCustomCell

+(instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *const ID = @"cell";
    YJSCustomCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil)
    {
        cell = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([YJSCustomCell class]) owner:nil options:nil].lastObject;
    }
    cell.contentLabel.text = @"北京市昌平区北京市";
//    NSInteger height = CGRectGetHeight(cell.contentLabel.frame);
    
    if ( cell.contentLabel.text.length < 14)
    {
        cell.contentLabel.textAlignment = NSTextAlignmentCenter;
        
    }
    else
    {
        cell.contentLabel.textAlignment = NSTextAlignmentLeft;
    }
    cell.contentLabel.numberOfLines = 0;
    cell.contentLabel.textColor = [UIColor colorWithHexString:@"#151515"];
    cell.heatLabel.text = @"热度59";
    cell.heatLabel.textColor = [UIColor colorWithHexString:@"#9e9e9e"];
    cell.centerLabel.text = @"北京新新医院";
    cell.centerLabel.textColor = [UIColor colorWithHexString:@"#9e9e9e"];
    cell.attributeLabel.text = @"指南";
    cell.attributeLabel.textColor = [UIColor colorWithHexString:@"#9e9e9e"];
    cell.imageLabel.image = [UIImage imageNamed:@"jimao"];
    cell.contentView.backgroundColor = [UIColor colorWithHexString:@"#fafafa"];
    cell.lineView.backgroundColor = [UIColor colorWithHexString:@"#eaeaea"];
    return cell;
}
@end
